import Vue from 'vue'
/**
 *    培养计划表格加载Switch组件 
 */
Vue.component('careersupport', {
    template: [
        '<div><el-button @click="addTeachSupport" v-if="rowData.careerDevelopmentBase==null" type="text" size="small">录入</el-button>',
        '<el-button @click="editTeachSupport" v-if="rowData.careerDevelopmentBase!=null" type="text" size="small">编辑</el-button>',
        '<el-button @click="detailTeachSupport" v-if="rowData.careerDevelopmentBase!=null" type="text" size="small">详情</el-button></div>'
    ].join(''),
    props: {
        rowIndex: {
            type: Number,
            required: true
        },
        rowData: {
            type: Object,
            required: true
        },
        columnData: {
            type: Object,
            required: true
        },
    },
    data() {
        return {
        }
    },
    created() {
    },
    methods: {
        addTeachSupport(){
            let rowData = this.rowData;
            this.$parent.$parent.$parent.$parent.showDialogTeachAdd(rowData);
        },
        editTeachSupport(){
            this.$parent.$parent.$parent.$parent.showDialogTeachEdit(this.rowData);
        },
        detailTeachSupport(){
            this.$parent.$parent.$parent.$parent.showDialogTeachDetail(this.rowData);
        }
    }
})